#ifndef PUSHLEVELEXITTRIGGER_H
#define PUSHLEVELEXITTRIGGER_H

#include "LevelExitTrigger.h"

/*
Use this to get out of the normal level queue and later get back to where you left off
*/

class PushLevelExitTrigger : public LevelExitTrigger
{
    public:
        PushLevelExitTrigger(const Vector2df p, const Vector2df s);
        PushLevelExitTrigger(const Vector2df p, const Vector2df s, string levelFileName);
        ~PushLevelExitTrigger();

        virtual void hit(const SimpleDirection dir, BaseUnit* player);
        virtual void update();
        virtual void customUpdate();    // Is called when the internal counter reaches zero
    protected:
        CountDown m_counter;            // Internal counter
        bool      m_active;             // Used to temporarily disable exit
    private:
        static void countDownWrapper(void* obj){((PushLevelExitTrigger*) obj)->customUpdate();}
};

#endif // PUSHLEVELEXITTRIGGER_H
